//
//  XS_ShowMsg.swift
//  EKLWisdom2021
//
//  Created by 韩云智 on 2021/5/2.
//

import UIKit
import Toast

public extension UIView {
    func xsShowMsg(_ message: String?, duration: TimeInterval = ToastManager.shared.duration, position: ToastPosition = ToastManager.shared.position, title: String? = nil, image: UIImage? = nil, style: ToastStyle = ToastManager.shared.style, completion: ((_ didTap: Bool) -> Void)? = nil) {
        guard let message = message, message.count > 0 else { return }
        hideToast()
        makeToast(message, duration: duration, position: position, title: title, image: image, style: style, completion: completion)
    }
}
